﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Data.DataTable
<!DOCTYPE html>

<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title>税款查询</title>
        @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
       <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )

    
    
    <script type="text/javascript">

        window.onresize = function () { $("#content").attr("height", parent.document.body.clientHeight - 100); }
        //查询
        function search() {
            lpModal.Show();
            $("#hAddCredits").val(AddCredits.GetValue());
            $("#hFYear").val(FYear1.GetText());
            $("#content").attr("src", rootPath + '/QueryAddCredits/QueryAddCreditsList?FYear=' + FYear1.GetText() + '&AddCredits=' + AddCredits.GetText());
            lpModal.Hide();
        }


        //重置
        function undo() {
            AddCredits.SetText("");
            FYear1.SetText("");
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        //if (CheckValues())
                        form_query.target = '_self';
                        form_query.action = rootPath + "/QueryAddCredits/ExportToXls";
                        form_query.submit();
                        break;
                    }
                case "btnReport":
                    {

                        document.frames["content"].focus();
                        document.frames["content"].print();

                        break;

                    }
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
   @using (Html.BeginForm("ExportToXls", "QueryAddCredits", FormMethod.Post, new { id = "form_query" }))
    {
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });


    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
 
        <table width="100%">
        <tr >
        <td align="center">
     <table>
        <tr>
            <td>
                年度:
            </td>
            <td>
           @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "FYear1";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
      }).Bind(ViewData["year"]).GetHtml()
            </td>
            <td>
                    增收大于:
           </td>
           <td>
     @Html.DevExpress().TextBox(settings =>
{
    settings.Name = "AddCredits";
    settings.Text = ViewData["AddCredits"].ToString();
    settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
}).GetHtml()
           </td> 
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnSearch";
               settings.Text = "查询";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
               settings.ClientSideEvents.Click = "search";
           }).GetHtml()
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnUndo";
               settings.Text = "重置";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
               settings.ClientSideEvents.Click = "undo";
           }).GetHtml()
            </td>
        </tr>

    </table>
       </td>
        </tr>
        </table>
         <div>
     <iframe  id='content' name='content' style='width:100%;' frameborder='0' src=''></iframe>
     </div>

         @Html.Hidden("hFYear", ViewData["year"]);
         @Html.Hidden("hAddCredits", ViewData["AddCredits"]);
    }
</body>
</html>
